package org.mj.im.common.lock;

import java.util.concurrent.TimeUnit;

public interface DistributeLock {
    boolean tryLock(long waitTime,long timeout, TimeUnit unit) throws InterruptedException;
    void lock(long leaseTime,TimeUnit unit);
    void unlock();
    boolean isLocked();
    boolean isHeldByCurrentThread();
    boolean isHeldByThread(long threadId);
}
